import OrderList from '@c/userOrder/orderList/index.vue'
import OrderDetails from '@c/userOrder/orderDetails/index.vue'

export default {
    components: {
        OrderList,
        OrderDetails  
    },
    data() {
        return {
            activeName: 'soTheOrder',
            search: "",
            screenName:'更多筛选条件',
            isMore:true,
            isDetails:false,
            orderDetail:{}
        }
    },
    methods: {
        // tab 切换
        handleClick(tab, event) {
            
        },

        handleIsDetails(order){
            this.isDetails = !this.isDetails
            this.orderDetail = order
        },

        // 点击搜索执行orderList组件中的方法发起请求
        handleSearch(){
            this.$refs.orderList.handleClickSearch(this.search)
        },
        
        // 筛选条件
        handleCommand(command) {
            this.screenName = command == 1? '更多筛选条件':'精简筛选条件'
            if(command == 1){
                this.isMore = true
            }else{
                this.isMore = false
            }
        }
    }
}